<?php

namespace App\Enums;

use App\Traits\EnumMethods;

enum LayerType: string
{
    use EnumMethods;

    case AVATAR = 'avatar';
    case BACKGROUND = 'background';
    case IMAGE = 'image';
    case NAME = 'name';
    case QRCODE = 'qrcode';
    case TEXT = 'text';

    const TYPE_MAP = [
        self::BACKGROUND->value => '背景图片',
        self::AVATAR->value => '选手头像',
        self::IMAGE->value => '遮罩图层',
        self::NAME->value => '选手姓名',
        self::QRCODE->value => '选手二维码',
        self::TEXT->value => '自定义文字',
    ];

    public function toString(): string
    {
        return self::TYPE_MAP[$this->value];
    }
}
